package com.lancoo.cvas.mapper;

import com.lancoo.cvas.config.MybatisRedisCache;
import com.lancoo.cvas.entity.RuleCourseProhibit;
import com.lancoo.cvas.entity.RuleTeachingClassProhibit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.cvas.entity.TeachingClassTeacher;
import com.lancoo.cvas.pojo.dto.ArrangeTeachingClassRuleDto;
import org.apache.ibatis.annotations.CacheNamespace;

import java.util.List;

/**
 * 行政班禁排
 * 
 * @author liufeng
 * @email 1037383243@qq.com
 * @date 2023-12-04 11:54:00
 */
@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface RuleTeachingClassProhibitMapper extends BaseMapper<RuleTeachingClassProhibit> {

    List<String> fixCheck(Integer taskId, Long teachingClassId, String schoolId, int deleted, int flag);

    List<RuleTeachingClassProhibit> getFixByTeachingClassId(Integer taskId, List<Long> teachingClassIds, int flag, int deleted);

    List<RuleTeachingClassProhibit> getTeachingClassFixByTeachingClassAndType(Integer taskId, List<TeachingClassTeacher> list, int flag, int deleted);

    boolean saveCourseFix(Integer taskId, List<Long> teachingClassIds, RuleCourseProhibit fix, Integer type,Long courseId);

    List<ArrangeTeachingClassRuleDto> getArrangeTeachingCourseRuleByTaskId(Integer taskId, int deleted);

    List<RuleTeachingClassProhibit> getFixByTeachingClassHourType(Integer taskId, Long teachingClassId, Integer hourType, int flag, int deleted);

    List<RuleTeachingClassProhibit> getAllProhibitTimeCode(Integer taskId, int deleted, int flag);


    void saveCourseFixByTeachingClass(Integer taskId, Long teachingClassId, List<RuleCourseProhibit> fixList, int type, int hourType, Long courseId);

    void addBatch(List<RuleTeachingClassProhibit> list);

    List<RuleTeachingClassProhibit> getRuleByTeachingClass(Integer taskId, List<Long> teachingClassIds, int deleted);

    List<Long> getRulesClass(Integer taskId, int deleted);
}
